3.2.50 \(\int \csc ^3(c+d x) (a+a \sec (c+d x))^n \, dx\) [150]

Optimal. Leaf size=112 \[ -\frac {a (2-n) (a+a \sec (c+d x))^{-1+n}}{4 d (1-n)}+\frac {a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}-\frac {(2+n) \, _2F_1\left (1,n;1+n;\frac {1}{2} (1+\sec (c+d x))\right ) (a+a \sec (c+d x))^n}{8 d n} \]

[Out]

-1/4*a*(2-n)*(a+a*sec(d*x+c))^(-1+n)/d/(1-n)+1/2*a*(a+a*sec(d*x+c))^(-1+n)/d/(1-sec(d*x+c))-1/8*(2+n)*hypergeo
m([1, n],[1+n],1/2+1/2*sec(d*x+c))*(a+a*sec(d*x+c))^n/d/n

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3958, 91, 80, 70} \begin {gather*} -\frac {(n+2) (a \sec (c+d x)+a)^n \, _2F_1\left (1,n;n+1;\frac {1}{2} (\sec (c+d x)+1)\right )}{8 d n}-\frac {a (2-n) (a \sec (c+d x)+a)^{n-1}}{4 d (1-n)}+\frac {a (a \sec (c+d x)+a)^{n-1}}{2 d (1-\sec (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^3*(a + a*Sec[c + d*x])^n,x]

[Out]

-1/4*(a*(2 - n)*(a + a*Sec[c + d*x])^(-1 + n))/(d*(1 - n)) + (a*(a + a*Sec[c + d*x])^(-1 + n))/(2*d*(1 - Sec[c
 + d*x])) - ((2 + n)*Hypergeometric2F1[1, n, 1 + n, (1 + Sec[c + d*x])/2]*(a + a*Sec[c + d*x])^n)/(8*d*n)

Rule 70

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b*c - a*d)^n*((a + b*x)^(m + 1)/(b^(
n + 1)*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(-(b*e - a*f
))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1
) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^Simplify[p + 1], x], x] /; FreeQ[{a, b, c
, d, e, f, n, p}, x] &&  !RationalQ[p] && SumSimplerQ[p, 1]

Rule 91

Int[((a_.) + (b_.)*(x_))^2*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*c - a*d
)^2*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d^2*(d*e - c*f)*(n + 1))), x] - Dist[1/(d^2*(d*e - c*f)*(n + 1)), In
t[(c + d*x)^(n + 1)*(e + f*x)^p*Simp[a^2*d^2*f*(n + p + 2) + b^2*c*(d*e*(n + 1) + c*f*(p + 1)) - 2*a*b*d*(d*e*
(n + 1) + c*f*(p + 1)) - b^2*d*(d*e - c*f)*(n + 1)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && (LtQ
[n, -1] || (EqQ[n + p + 3, 0] && NeQ[n, -1] && (SumSimplerQ[n, 1] ||  !SumSimplerQ[p, 1])))

Rule 3958

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Dist[-(f*b^(p - 1)
)^(-1), Subst[Int[(-a + b*x)^((p - 1)/2)*((a + b*x)^(m + (p - 1)/2)/x^(p + 1)), x], x, Csc[e + f*x]], x] /; Fr
eeQ[{a, b, e, f, m}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \csc ^3(c+d x) (a+a \sec (c+d x))^n \, dx &=-\frac {a^4 \text {Subst}\left (\int \frac {x^2 (a-a x)^{-2+n}}{(-a-a x)^2} \, dx,x,-\sec (c+d x)\right )}{d}\\ &=\frac {a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}+\frac {\text {Subst}\left (\int \frac {(a-a x)^{-2+n} \left (-a^3 n+2 a^3 x\right )}{-a-a x} \, dx,x,-\sec (c+d x)\right )}{2 d}\\ &=-\frac {a (2-n) (a+a \sec (c+d x))^{-1+n}}{4 d (1-n)}+\frac {a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}-\frac {\left (a^2 (2+n)\right ) \text {Subst}\left (\int \frac {(a-a x)^{-1+n}}{-a-a x} \, dx,x,-\sec (c+d x)\right )}{4 d}\\ &=-\frac {a (2-n) (a+a \sec (c+d x))^{-1+n}}{4 d (1-n)}+\frac {a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}-\frac {(2+n) \, _2F_1\left (1,n;1+n;\frac {1}{2} (1+\sec (c+d x))\right ) (a+a \sec (c+d x))^n}{8 d n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.43, size = 179, normalized size = 1.60 \begin {gather*} \frac {\cos (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right ) (1+\sec (c+d x))^{-n} (a (1+\sec (c+d x)))^n \left (2^{1+n} \, _2F_1\left (1,1-n;2-n;\cos (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)\right )^n+2^n \, _2F_1\left (2,1-n;2-n;\cos (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)\right )^n+(1+\sec (c+d x))^n\right )}{8 d (-1+n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^3*(a + a*Sec[c + d*x])^n,x]

[Out]

(Cos[c + d*x]*Sec[(c + d*x)/2]^2*(a*(1 + Sec[c + d*x]))^n*(2^(1 + n)*Hypergeometric2F1[1, 1 - n, 2 - n, Cos[c
+ d*x]*Sec[(c + d*x)/2]^2]*(Cos[(c + d*x)/2]^2*Sec[c + d*x])^n + 2^n*Hypergeometric2F1[2, 1 - n, 2 - n, Cos[c
+ d*x]*Sec[(c + d*x)/2]^2]*(Cos[(c + d*x)/2]^2*Sec[c + d*x])^n + (1 + Sec[c + d*x])^n))/(8*d*(-1 + n)*(1 + Sec
[c + d*x])^n)

________________________________________________________________________________________

Maple [F]
time = 0.10, size = 0, normalized size = 0.00 \[\int \left (\csc ^{3}\left (d x +c \right )\right ) \left (a +a \sec \left (d x +c \right )\right )^{n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^3*(a+a*sec(d*x+c))^n,x)

[Out]

int(csc(d*x+c)^3*(a+a*sec(d*x+c))^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^3*(a+a*sec(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((a*sec(d*x + c) + a)^n*csc(d*x + c)^3, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^3*(a+a*sec(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((a*sec(d*x + c) + a)^n*csc(d*x + c)^3, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{n} \csc ^{3}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**3*(a+a*sec(d*x+c))**n,x)

[Out]

Integral((a*(sec(c + d*x) + 1))**n*csc(c + d*x)**3, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^3*(a+a*sec(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((a*sec(d*x + c) + a)^n*csc(d*x + c)^3, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n}{{\sin \left (c+d\,x\right )}^3} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(c + d*x))^n/sin(c + d*x)^3,x)

[Out]

int((a + a/cos(c + d*x))^n/sin(c + d*x)^3, x)

________________________________________________________________________________________